//package com.cus.shd.sharingjdbc.config;
//
//import com.alibaba.druid.pool.DruidDataSource;
//import org.apache.shardingsphere.driver.api.ShardingSphereDataSourceFactory;
//import org.apache.shardingsphere.infra.config.algorithm.ShardingSphereAlgorithmConfiguration;
//import org.apache.shardingsphere.sharding.algorithm.sharding.inline.InlineShardingAlgorithm;
//import org.apache.shardingsphere.sharding.api.config.ShardingRuleConfiguration;
//import org.apache.shardingsphere.sharding.api.config.rule.ShardingTableRuleConfiguration;
//import org.apache.shardingsphere.sharding.api.config.strategy.keygen.KeyGenerateStrategyConfiguration;
//import org.apache.shardingsphere.sharding.api.config.strategy.sharding.StandardShardingStrategyConfiguration;
//import org.apache.shardingsphere.sharding.spi.KeyGenerateAlgorithm;
//import org.springframework.stereotype.Service;
//
//import javax.annotation.Resource;
//import javax.crypto.KeyGenerator;
//import javax.sql.DataSource;
//import java.sql.Connection;
//import java.sql.PreparedStatement;
//import java.sql.ResultSet;
//import java.sql.SQLException;
//import java.util.Collections;
//import java.util.HashMap;
//import java.util.Map;
//import java.util.Properties;
//
//@Service
//public class SharingJdbcConfig {
//
//    @Resource
//    private DataSource dataSource;
//
//    public void com(){
//        try {
//            String sql = "SELECT * FROM outside_agent_landing_delivery_log WHERE landing_delivery_id=?";
//            Connection conn = dataSource.getConnection();
//            PreparedStatement ps = conn.prepareStatement(sql);
//            ps.setLong(1, 151754140268929856L);
//            ResultSet rs = ps.executeQuery();
//            while (rs.next()) {
//                // ...
//                System.out.println("id=" + rs.getObject("id"));
//                System.out.println("landing_delivery_id=" + rs.getObject("landing_delivery_id"));
//                System.out.println("waybill_number=" + rs.getObject("waybill_number"));
//            }
//        } catch (Exception e) {
//            e.printStackTrace();
//        }
//        System.out.println("abc");
//    }
//}
